<template>
  <article class="m-common-item">
    <div class="m-common-item-hd">
      <div class="name">
        <div class="img-box">
          <img v-lazy="common.userHeadImg">
        </div>
        <span class="username">{{common.userName}}</span>
      </div>
      <yd-rate slot="left" v-model="common.descriptionEvaluate" :readonly="true" size="12px" activeColor="#f00385"></yd-rate>
    </div>
    <div class="m-common-item-ct">
      <p class="tit">{{common.evaluateInfo}}</p>
      <div class="img-list">
        <div class="img-box" v-for="(photo, index) in common.evaluatePhotos" :key="index">
          <img v-lazy="photo">
        </div>
      </div>
    </div>
    <div class="m-common-item-ft">
      <p class="time">2017-10-21 12:12:42</p>
    </div>
  </article>
</template>

<script>
  export default {
    props: {
      common: {
        type: [Object]
      }
    },
    data() {
      return {
        rate6: 4
      }
    }
  }
</script>

<style lang="scss">
  @import '../../scss/_flex.scss';
  @import '../../scss/_mixin.scss';
  .m-common-item-null {
    padding: .3rem 0;
    color: #999;
    text-align: center;
  }
  .m-common-item {
    padding: .28rem 0;
    border-bottom: 1px solid #eee;
    &:last-child {
      border-bottom: none;
    }
    .img-box {
      display: inline-block;
      border: 1px solid #eee;
      overflow: hidden;
      vertical-align: middle;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
  .m-common-item-hd {
    @include flex();
    padding-bottom: .24rem;
    .img-box {
      width: .6rem;
      height: .6rem;
      margin-right: .1rem;
    }
    .username {
      @include cutoff();
      display: inline-block;
      max-width: 3.9rem;
    }
  }
  .m-common-item-ct {
    .tit {
      white-space: pre-wrap;
      line-height: .36rem;
    }
    .img-list {
      margin-top: .14rem;
    }
    .img-box {
      width: 1.2rem;
      height: 1.2rem;
      margin-right: .1rem;
    }
  }
  .m-common-item-ft {
    padding-top: .2rem;
    .time {
      color: #999;
    }
  }
</style>